import axiosService from "@/utils/request.js"

export function pageContestService(data) {
    return axiosService({
        url: "/project/contest/page",
        method: "post",
        data: data
    })
}

export function createEnrollContestService(data) {
    return axiosService({
        url: "/project/contest/enroll",
        method: "post",
        data: data
    })
}

export function cancelEnrollContestService(data) {
    return axiosService({
        url: "/project/contest/cancel-enroll",
        method: "post",
        data: data
    })
}

export function someRemindContestService(data) {
    return axiosService({
        url: "/project/contest/some-remind",
        method: "post",
        data: data
    })
}

export function createRemindContestService(data) {
    return axiosService({
        url: "/project/contest/remind",
        method: "post",
        data: data
    })
}

export function cancelRemindContestService(data) {
    return axiosService({
        url: "/project/contest/cancel-remind",
        method: "post",
        data: data
    })
}

export function pageListEnrollContestService(current, size) {
    return axiosService({
        url: "/project/contest/page-list-enroll",
        method: "get",
        params: {
            current: current,
            size: size
        }
    })
}

export function firstQuestionContestService(id) {
    return axiosService({
        url: "/project/contest/first-question",
        method: "get",
        params: {
            id: id
        }
    })
}

export function prevQuestionContestService(data) {
    return axiosService({
        url: "/project/contest/prev-question",
        method: "post",
        data: data
    })
}

export function nextQuestionContestService(data) {
    return axiosService({
        url: "/project/contest/next-question",
        method: "post",
        data: data
    })
}

export function finishContestService(id) {
    return axiosService({
        url: "/project/contest/finish",
        method: "post",
        params: {
            contest_id: id
        }
    })
}